home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 3
/
Cream of the Crop 3.iso
/
comm
/
prtcs155.zip
/
ACVT.WPL
next >
Wrap
Text File
|
1994-01-14
|
2KB
|
48 lines
/**/
v="$VER: Acvt Wplrx Convert Emsi to Wpl, Fix domains Williamson 55.00"
/*
Converts a list of 3d, 4d or 5d EMSI formatted addresses
zone:net/node[.point][@domain[.org|ftn]]
to wpl format
domain#zone:net/node.point
Also corrects DOMAIN.
RexxMsg "" REXX "$(rexxdir)acvt.wplrx $(remote.addresses)"
*/
dl="FIDONET 1 FIDONET 2 FIDONET 3 FIDONET 4 FIDONET 5 FIDONET 6 AMIGANET 38 AMIGANET 39 AMIGANET 40 FRANCOMEDIA 101 MTLNET 17 CJNET 100"
parse upper arg x
new=""
do i=1 to words(x)
y=word(x,i)
if left(right(y,4),1)="." & datatype(right(y,3),'Mixed') then y=delstr(y,lastpos('.',y),4)
if pos('.',y) > 0 then do
if pos('@',y)>0 then do
parse var y z':'n'/'f'.'p'@'d
if (pos(z,"1 2 3 4 5 6")>0 & d~="FIDONET") | (pos(z,"1 2 3 4 5 6")=0 & d="FIDONET") then d=find_domain(z)
if d~=find_domain(z) then d=find_domain(z)
new=new||d'#'z':'n'/'f'.'p' '
end;else do
parse var y z':'n'/'f'.'p
new=new||find_domain(z)'#'z':'n'/'f'.'p' '
end
end;else do
if pos('@',y)>0 then do
parse var y z':'n'/'f'@'d
if (pos(z,"1 2 3 4 5 6")>0 & d~="FIDONET") | (pos(z,"1 2 3 4 5 6")=0 & d="FIDONET") then d=find_domain(z)
if d~=find_domain(z) then d=find_domain(z)
new=new||d'#'z':'n'/'f'.0 '
end;else do
parse var y z':'n'/'f
new=new||find_domain(z)'#'z':'n'/'f'.0 '
end
end
end
'Set remote.addresses "'new'"'
exit
find_domain: procedure expose dl
dz=FIND(dl,arg(1))
if dz=0 then return "UNKNOWN"
else return strip(word(dl,dz-1))